﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using FightTheDragon.Managers;

namespace FightTheDragon.GameObjects
{
    class Spell : BaseObject
    {
        //Will Need animation system for the Spell
        //Possible Shaders for the graphics
        //Need Melee,Fire Breath, Fire Ground, Fissure,
        // and Meteor
        private float m_fCoolDown;

        public float fCoolDown
        {
            set { m_fCoolDown = value; }
            get { return m_fCoolDown; }
        }
        private float m_fCDTimer;

        public float fCDTimer
        {
            set { m_fCDTimer = value; }
            get { return m_fCDTimer; }
        }
        private bool m_fUsable;

        public bool Usable
        {
            set { m_fUsable = value; }
            get { return Usable; }
        }
       


        // if we see this something is wrong
        public  Spell()
        {
            base.Texture = "ERROR!";
            m_fCoolDown = 0;
            m_fCDTimer = 0;
            m_fUsable = true;
        }

        public override void Update(float fgameTime)
        {
            if(m_fUsable)
            base.Update(fgameTime);

            if(!m_fUsable)
            m_fCDTimer += fgameTime;

            if (m_fCDTimer >= m_fCoolDown)
            {
                m_fCDTimer = 0;
                m_fUsable = true;
            }

        }
        
        
    }
    // will only need 1 texture or Image
    class FireBreath : Spell
    {
        public FireBreath()
        {
            base.Texture = "Insert Fire Breath Here";
            // will need to find out rotation value later
            // Determine CD and Timer
        }
    }
    // will need multiple Images
    class Meteor : Spell
    {
        private int m_nResetTimes;
        
        public int nResetTimes
        {
            set { m_nResetTimes = value; }
            get { return m_nResetTimes; }
        }
        private Vector2 m_vOriginalPosition;

        public Vector2 vOriginalPosition
        {
            set { m_vOriginalPosition = value; }
            get { return m_vOriginalPosition; }
        }

        public Meteor(Vector2 Start)
        {
            base.Texture = "Insert Meteor Here";
            m_vOriginalPosition = Start;
            VPosition = m_vOriginalPosition;
            m_nResetTimes = 0;
           // m_vOriginalPosition = VPosition;
            // will need to find out rotation value later
            // Determine CD and Timer
        }

        public override void Update(float fgameTime)
        {
 	        base.Update(fgameTime);

        }
        public override bool CheckCollision(BaseObject Check)
        {

        }
        
    }
    // will need multiple Images
    class FirePillar : Spell
    {
    }
    // ITS COMPLICATED!~~~~~~~~~WAVE effect
    class Fissure : Spell
    {
    }
    // will need 1 texture or Image
    class Melee : Spell
    {
    }
}
